﻿@model blacksoft.Models.OrdenMantenimiento

@{
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
    ViewBag.Title = "OrdenMantenimiento";
}

@if (@TempData["errorSave"] != null)
{
    <script type="text/javascript">
        alert("@TempData["errorSave"]");
    </script>
}

<div class="block big">
    <div class="titlebar">
        <h3>Nueva Orden</h3>
    </div>
    <div class="block_cont">
        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()

            <div class="form">
                @Html.ValidationSummary(true)

                <div class="form-group">
                    @Html.LabelFor(model => model.IDPersona, "IDPersona", new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.DropDownList("IDPersona", String.Empty)
                        @Html.ValidationMessageFor(model => model.IDPersona)
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.IDTerminal, "IDTerminal", new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.DropDownList("IDTerminal", String.Empty)
                        @Html.ValidationMessageFor(model => model.IDTerminal)
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.Fecha, new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Fecha)
                        @Html.ValidationMessageFor(model => model.Fecha)
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.Total, new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.EditorFor(model => model.Total)
                        @Html.ValidationMessageFor(model => model.Total)
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.Estado, new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.DropDownList("Estado", new[]
                {
                    new SelectListItem() {Text = "Activo", Value="AC"},
                })
                        @Html.ValidationMessageFor(model => model.Estado)
                    </div>
                </div>
                <br />
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <input type="submit" value="Registrar" class="btn btn-default" />
                        <br />
                        @Html.ActionLink("Regresar al listado", "Index")
                    </div>
                </div>
            </div>
        }
    </div>
</div> 



